Cell nuclei segmentation

Image segmentation is basically the process of assigning a label to every pixel in an image such that pixels with the same label share the same characteristics.

The objective of this project is to automatically segment any medical image containing cell nuclei by assigning a value of 1 to the cell nuclei and 0 to the rest. For this purpose, a deep learning model will be trained with a large number of medical images containing cell nuclei.

Dataset from https://www.kaggle.com/c/data-science-bowl-2018/data

Zhouxiang Guo

Create paths for training images and masks

The first step is to get the full path of the training data, medical images and their respective masks which contain the labels of the medical images.

Preprocessing

Before passing the input datas to the model, they need to be preproceded with computer vision techniques such as resize, normalization, etc.

Initial state of the data:

The initial state of the input data is checked.

It can be seen that each segmented cell nuclei is located in different masks. This is a problem because they are needed to be all in one.

Combine all the masks of a certain image into a single one

Each mask from a medical image is combined into a single one.

As can be seen, the masks have been combined.

Resize images and masks

The second preprocessing step is to resize all the images and masks because the model need all the input image to have the same size. In this case, they are going to be dowsized to 128x128

Binarize masks

Some masks are not completely black and white, this may decrease the final accuracy enormely due to the large number of label classes. Therefore, a binarization technique is necessary.

Normalize images and masks

The final step is to normalize the images and masks so their pixel values are ranged between 0 and 1. This step increase the prediction accuracy.

Fixing

After passing the training data to the model, the model could not perform the training due to an inconsistency between the dimensions accepted by the model and those of the training images. Thefore, the dimensions of the training datas must be altered so they can fit in the model.

Preprocessing done

Create deep learning model

Build U-Net model

U-Net is a convolutional neural network that was developed for biomedical image segmentation at the Computer Science Department of the University of Freiburg. The network is based on the fully convolutional network and its architecture was modified and extended to work with fewer training images and to yield more precise segmentations. Segmentation of a 512 × 512 image takes less than a second on a modern GPU.

Source: https://en.wikipedia.org/wiki/U-Net

Make predictions

Checking if model works correctly

Checking if model works correctly by predicting already known input data such as the images used for training

Checking if model predicts correctly

Checking if model predicts correctly by predicting unknown input data

Accuracy and other performance metrics can not be given because masks for testing were not provided, only medical images were provided. So, all that can be done were showing the masks created by the model' prediction.